package com.sky.controller.user;

import com.sky.result.Result;
import com.sky.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * NotificationPayController
 *
 * @author liliudong
 * @version 1.0
 * @description
 * @date 2023/8/4 15:09
 */
@RestController
@RequestMapping("/notification")
public class NotificationPayController {

    @Autowired
    private OrderService orderService;

    /**
     * 支付成功 微信调用的，并且回调了订单号
     *
     * @param number 数量
     * @return {@link Result}<{@link ?}>
     */
    @GetMapping("/paySuccess")
    public Result<?> paySuccess(String number) {
        orderService.paySuccess(number);
        return Result.success();
    }
}
